/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cw.biz;

import cw.controller.PuzzleSizeJpaController;
import cw.entity.PuzzleSize;
import java.util.List;

/**
 *
 * @author VinhTC
 */
public class PuzzleSizeBiz {

    PuzzleSizeJpaController puzzSizeController = new PuzzleSizeJpaController();

    public PuzzleSizeBiz() {
    }

    /**
     * this method use to get all PuzzleSize
     * @return-- List <PuzzleSize>
     */
    public List<PuzzleSize> getAllPuzzleSize() {
        try {
            return puzzSizeController.findPuzzleSizeEntities();
        } catch (Exception e) {
            return null;
        }
    }

    /**
     * getSizeByName
     * @param sizeName
     * @return PuzzleSize
     */
    public PuzzleSize getSizeByName(String sizeName) {
        try {
            return puzzSizeController.getSizeByName(sizeName);
        } catch (Exception e) {
            return null;
        }
    }
}
